<template>
	<view>
		<view class="index">
			<view class="index-t">
				<view class="index-t1">
					温馨提示：
				</view>
				<view class="index-t2">
					1、需要开翻墙哦！[请在hybrid-html-maps-js-lib-common.js 添加MAPID 和修改所有的index.html内部的key]
				</view>
				<view class="index-t2">
					2、配置高德地图【MapID】 和 【key】
				</view>
				<view class="index-t2">
					3、页面部分数据为mock数据 ，实际开发中，请自行替换 ，不用纠结是干嘛的！
				</view>
				<view class="index-t2">
					4、nvue、vue与web-view之间相互传值与接收值是不同的，该知识请自行前往官网进行脑补 关键词：【web-view】
				</view>
				<view class="index-t2" style="color: #666;">
					4、欢迎大家留言踊跃提出相关示例，楼主完善后同步相关功能！
				</view>
			</view>
			<view class="list-box">
				<view class="list-box-title">
					<text>谷歌地图案例之家</text>
				</view>
				<block v-for="(item,i) in tabbarArr" :key="i">
					<view class="list-item" @click="goUrl(item)">
						<text>{{i+1}}.{{item.name}}</text>
						<image src="../../static/37.png" mode=""></image>
					</view>
				</block>
			</view>
		</view>
	</view>
</template>

<script>
	import Vue from 'vue';
	export default {
		data() {
			return {
				tabbarArr: [{
						id: 1,
						name: "初始化地图",

					}, {
						id: 2,
						name: "markers标记点、信息弹窗",
					},
					{
						id: 3,
						name: "搜索",
					}, {
						id: 4,
						name: "画圆",
					},
					{
						id: 5,
						name: "画路线",
					}, {
						id: 6,
						name: "画折线",
					}, {
						id: 7,
						name: "画省、市、区",

					},
					{
						id: 8,
						name: "画折线[支持线可拖动]",

					},
					{
						id: 9,
						name: "定位【原始位置】",

					}

				]
			};
		},

		methods: {
			goUrl(item) {
				uni.navigateTo({
					url: '/pages/index/index1?type=' + item.id
				})
			}

		}
	};
</script>

<style scoped lang="scss">
	.index {
		width: 100%;
		padding-bottom: 20rpx;
		box-sizing: border-box;

		.list-box {
			width: 100%;
			margin-top: 20rpx;
			padding: 0 24rpx;
			box-sizing: border-box;

			.list-box-title {
				width: 100%;
				margin-bottom: 30rpx;

				text {
					font-size: 30rpx;
					font-weight: 500;
					position: relative;
					padding-left: 15rpx;
					box-sizing: border-box;
					text-decoration: underline;
				}

				text:after {
					content: '';
					width: 7rpx;
					height: 25rpx;
					position: absolute;
					left: 0;
					top: 13rpx;
					background-color: #333;
				}
			}

			.list-item {
				width: 100%;
				display: flex;
				align-items: center;
				justify-content: space-between;
				border: 1px solid #f5f5f5;
				margin-bottom: 20rpx;
				padding: 30rpx 20rpx;
				box-sizing: border-box;
				border-radius: 10rpx;

				text {
					font-size: 28rpx;
					font-weight: 500;
					font-family: 'Courier New', Courier, monospace;
				}

				image {
					width: 15rpx;
					height: 20rpx;
				}
			}
		}

		.index-t {
			width: 100%;
			background-color: #f5f5f5;
			padding: 15rpx;
			box-sizing: border-box;

			.index-t1 {
				width: 100%;
				font-size: 32rpx;
				font-weight: 600;

			}

			.index-t2 {
				font-size: 28rpx;
				font-weight: 400;
				margin-top: 15rpx;
				margin-left: 20rpx;
				color: #999;
				line-height: 45rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 20;
				word-break: break-all;
				word-wrap: break-word;
				white-space: normal;
				word-break: break-word;
			}
		}
	}
</style>